<?php
/**
 * 判断浏览器环境
 *
 * Created by PhpStorm.
 * User: sunqiang
 * Date: 2019-01-08
 * Time: 17:08
 */

namespace App\Http\Controllers;


class BrowserEnvironmentController extends Controller
{
    public function __invoke()
    {
        if (strpos($_SERVER['HTTP_USER_AGENT'], 'XLMessenger')) {
            echo '闲聊环境';
        }
        if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger')) {
            echo '微信环境';
        }
        if (strpos($_SERVER['HTTP_USER_AGENT'], 'FPAPPMessenger')) {
            echo '方片app环境';
        }
    }
}